Movable barrier operator having force and position learning capability

ABSTRACT

A movable barrier operator includes a wall control switch module having a learn switch thereon. The switch module is connectable to a control unit positioned in a head of a garage movable barrier operator. The head unit also contains an electric motor which is connected to a transmission for opening and closing a movable barrier such as a garage door. The switch module includes a plurality of switches coupled to capacitors which, when closed, have varying charge and discharge times to enable which switch has been closed. The control unit includes an automatic force incrementing system for adjusting the maximal opening and closing force to be placed upon the movable barrier during a learn operation. Likewise, end of travel limits can also be set during a learn operation upon installation of the unit. The movable barrier operator also includes an ambient temperature sensor which is used to derive a motor temperature signal, which motor temperature signal is measured and is used to inhibit motor operation when further motor operation exceeds or is about to exceed set point temperature limits.

BACKGROUND OF THE INVENTION

[0001] The invention relates in general to a movable barrier operatorfor opening and closing a movable barrier or door. More particularly,the invention relates to a garage door operator that can learn force andtravel limits when installed and can simulate the temperature of itselectric motor to avoid motor failure during operation.

[0002] A number of garage door operators have been sold over the years.Most garage door operators include a head unit containing a motor havinga transmission connected to it, which may be a chain drive or a screwdrive, which is coupled to a garage door for opening and closing thegarage door. Such garage door openers also have included opticaldetection systems located near the bottom of the travel of the door toprevent the door from closing on objects or on persons that may be inthe path of the door. Such garage door operators typically include awall control which is connected via one or more wires to the head unitto send signals to the head unit to cause the head unit to open andclose the garage door, to light a worklight or the like. Such prior artgarage door operators also include a receiver and head unit forreceiving radio frequency transmissions from a hand-held codetransmitter or from a keypad transmitter which may be affixed to theoutside of the garage or other structure. These garage door operatorstypically include adjustable limit switches which cause the garage doorto operate or to halt the motor when the travel of the door causes thelimit switch to change state which may either be in the up position orin the down position. This prevents damage to the door as well damage tothe structure supporting the door. It may be appreciated, however, thatwith different size garages and different size doors, the limits oftravel must be custom set once the unit is placed within the garage. Inthe past, such units have had mechanically adjustable limit switcheswhich are typically set by an installer. The installer must go back andforth between the door, the wall switch and the head unit in order tomake the adjustment. This, of course, is time consuming and results inthe installer being forced to spend more time than is desirable toinstall the garage door operator.

[0003] A number of requirements are in existence from Underwriter'sLaboratories, the Consumer Product Safety Commission and the like whichrequire that garage door operators sold in the United States must, whenin a closing mode and contacting an obstruction having a height of morethan one inch, reverse and open the door in order to prevent damage toproperty and injury to persons. Prior art garage door operators alsoincluded systems whereby the force which the electric motor applied tothe garage door through the transmission might be adjusted. Typically,this force is adjusted by a licensed repair technician or installer whoobtained access to the inside of the head unit and adjusts a pair ofpotentiometers, one of which sets the maximal force to be applied duringthe closing portion of door operation, the other of which establishesthe maximum force to be applied during the opening of door operation.

[0004] Such a garage door operator is exemplified by an operator taughtin U.S. Pat. No. 4,638,443 to Schindler. However, such door operatorsare relatively inconvenient to install and invite misuse because thehomeowner, using such a garage door operator, if the garage dooroperator begins to bind or jam in the tracks, may likely obtain accessto the head unit and increase the force limit. Increasing the maximalforce may allow the door to move passed a binding point, but apply themaximal force at the bottom of its travel when it is almost closedwhere, of course, it should not.

[0005] Another problem associated with prior art garage door operatorsis that they typically use electric motors having thermostats connectedin series with portions of their windings. The thermostats are adaptedto open when the temperature of the winding exceeds a preselected limit.The problem with such units is that when the thermostats open, the doorthen stops in whatever position it is then in and can neither be openedor closed until the motor cools, thereby preventing a person fromexiting a garage or entering the garage if they need to.

SUMMARY OF THE INVENTION

[0006] The present invention is directed to a movable barrier operatorwhich includes a head unit having an electric motor positioned therein,the motor being adapted to drive a transmission connectable to themotor, which transmission is connectable to a movable barrier such as agarage door. A wired switch is connectable to the head unit forcommanding the head unit to open and close the door and for commanding acontroller within the head unit to enter a learn mode. The controllerincludes a microcontroller having a non-volatile memory associated withit which can store force set points as well as digital end of travelpositions within it. When the controller is placed in learn mode byappropriate switch closure from the wall switch, the door is caused tocycle open and closed. The force set point stored in the non-volatilememory is a relatively low set point and if the door is placed in learnmode and the door reaches a binding position, the set point will bechanged by increasing the set point to enable the door to travel throughthe binding area. Thus, the set points will be dynamically adjusted asthe door is in the learn, but the set points will not be changeable oncethe door is taken out of the learn mode, thereby preventing the forceset point from being inadvertently increased, which might lead toproperty damage or injury. Likewise, the end of travel positions can beadjusted automatically when in the learn mode because if the door ishalted by the controller, when the controller senses that the doorposition has reached the previously set end of travel position, the doorwill then be commanded by a button push from the wall switch to keeptravelling in the same direction, thereby incrementing or changing. Theend of travel limits are set by pushing the learn button on the wallswitch which causes the door to travel upward and continue travellingupward until the door has travelled as far as the operator wishes it totravel. The disables the learn switch by lifting his hand from thebutton. The up limit is then stored and the door is then moved towardthe closed position. A pass point or position normalizing systemconsisting of a ring-like light interrupter attached to the garage doorcrosses the light path of an optical obstacle detector signallinginstantaneously the position of the door and the door continues until itcloses, whereupon force sensing in the door causes an auto-reverse totake place and then raises the door to the up position, the learn modehaving been completed and the door travel limits having been set.

[0007] The movable barrier operator also includes a combination of atemperature sensor and microcontroller. The temperature sensor sensesthe ambient temperature within the head unit because it is positioned inproximity with the electric motor. When the electric motor is operated,a count is incremented in the microcontroller which is multiplied by aconstant which is indicative of the speed at which the motor is moving.This incremented multiplied count is then indicative of the rise intemperature which the motor has experienced by being operated. The counthas subtracted from it the difference between the simulated temperatureand the ambient temperature and the amount of time which the motor hasbeen switched off. The totality of which is multiplied by a constant.The remaining count then is an indication of the extant temperature ofthe motor. In the event that the temperature, as determined by themicrocontroller, is relatively high, the unit provides a predictivefunction in that if an attempt is made to open or close the garage door,prior to the door moving, the microcontroller will make a determinationas to whether the single cycling of the door will add additionaltemperature to the motor causing it to exceed a set point temperatureand, if so, will inhibit operation of the door to prevent the motor frombeing energized so as to exceed its safe temperature limit.

[0008] The movable barrier operator also includes light emitting diodesfor providing an output indication to a user of when a problem may havebeen encountered with the door operator. In the event that furtheroperation of the door operator will cause the motor to exceed its setpoint temperature, an LED will be illuminated as a result of themicrocontroller temperature prediction indicating to the user that themotor is not operating because further operation will cause the motor toexceed its safe temperature limits.

[0009] It is a principal aspect of the present invention to provide amovable barrier operator which is able to quickly and automaticallyselect end of travel positions.

[0010] It is another aspect of the present invention to provide amovable barrier operator which, upon installation, is able to quicklyestablish up and down force set points.

[0011] It is still another aspect of the present invention to provide amovable barrier operator which can determine the temperature of themotor based upon motor history and the ambient temperature of the headunit.

[0012] Other aspects and advantages of the invention will become obviousto one of ordinary skill in the art upon a perusal of the followingspecification and claims in light of the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 is a perspective view of a garage having mounted within ita garage door operator embodying the present invention;

[0014]FIG. 2 is a block diagram of a controller mounted within the headunit of the garage door operator employed in the garage door operatorshown in FIG. 1;

[0015]FIG. 3 is a schematic diagram of the controller shown in blockformat in FIG. 2;

[0016]FIG. 4 is a schematic diagram of a receiver module shown in theschematic diagram of FIG. 3;

[0017]FIG. 5A-B are a flow chart of a main routine that executes in amicrocontroller of the control unit;

[0018] FIGS. 6A-G are a flow diagram of a learn routine executed by themicrocontroller;

[0019] FIGS. 7A-B are flow diagrams of a timer routine executed by themicrocontroller;

[0020] FIGS. 8A-B are flow diagrams of a state routine representative ofthe current and recent state of the electric motor;

[0021] FIGS. 9A-B are a flow chart of a tachometer input routine andalso determines the position of the door on the basis of the pass pointsystem and input from the optical obstacle detector;

[0022] FIGS. 10A-C are flow charts of the switch input routines from theswitch module; and

[0023]FIG. 11 is a schematic diagram of the switch module and the switchbiasing circuit.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0024] Referring now to the drawings and especially to FIG. 1, morespecifically a movable barrier door operator or garage door operator isgenerally shown therein and referred to by numeral 10 includes a headunit 12 mounted within a garage 14. More specifically, the head unit 12is mounted to the ceiling of the garage 14 and includes a rail 18extending therefrom with a releasable trolley 20 attached having an arm22 extending to a multiple paneled garage door 24 positioned formovement along a pair of door rails 26 and 28. The system includes ahand-held transmitter unit 30 adapted to send signals to an antenna 32positioned on the head unit 12 and coupled to a receiver as will appearhereinafter. An external control pad 34 is positioned on the outside ofthe garage having a plurality of buttons thereon and communicate viaradio frequency transmission with the antenna 32 of the head unit 12. Aswitch module 39 is mounted on a wall of the garage. The switch module39 is connected to the head unit by a pair of wires 39 a. The switchmodule 39 includes a learn switch 39 b, a light switch 39 c, a lockswitch 39 d and a command switch 39 e. An optical emitter 42 isconnected via a power and signal line 44 to the head unit. An opticaldetector 46 is connected via a wire 48 to the head unit 12. A pass pointdetector 49 comprising a bracket 49 a and a plate structure 49 bextending from the bracket has a substantially circular aperture 49 cformed in, the bracket, which aperture might also be square orrectangular. The pass point detector is arranged so that it interruptsthe light beam on a bottom leg 49 d and allows the light beam to passthrough the aperture 49 c. The light beam is again interrupted by theleg 49 e, thereby signalling the controller via the optical detector 46that the pass point detector attached to the door has moved passed acertain position allowing the controller to normalize or zero itsposition, as will be appreciated in more detail hereinafter.

[0025] As shown in FIG. 2, the garage door operator 10, which includesthe head unit 12 has a controller 70 which includes the antenna 32. Thecontroller 70 includes a power supply 72 which receives alternatingcurrent from an alternating current source, such as b 110 volt AC, andconverts the alternating current to +5 volts zero and 24 volts DC. The 5volt supply is fed along a line 74 to a number of other elements in thecontroller 70. The 24 volt supply is fed along the line 76 to otherelements of the controller 70. The controller 70 includes a superregenerative receiver 80 coupled via a line 82 to supply demodulateddigital signals to a microcontroller 84. The receiver is energized by aline 86 coupled to the line 74. The microcontroller is also coupled by abus 86 to a non-volatile memory 88, which non-volatile memory stores setpoints and other customized digital data related to the operation of thecontrol unit. An obstacle detector 90, which comprises the emitter 42and infrared detector 46 is coupled via an obstacle detector bus 92 tothe microcontroller. The obstacle detector bus 92 includes lines 44 and48. The wall switch 39 is connected via the connecting wires 39 a to aswitch biasing module 96 which is powered from the 5 volt supply line 74and supplies signals to and is controlled by the microcontroller via abus 100 coupled to the microcontroller. The microcontroller, in responseto switch closures, will send signals over a relay logic line 102 to arelay logic module 104 connected to an alternating current motor 106having a power take-off shaft 108 coupled to the transmission 18 of thegarage door operator. A tachometer 110 is coupled to the shaft 108 andprovides a tachometer signal on a tachometer line 112 to themicrocontroller 84. The tachometer signal being indicative of the speedof rotation of the motor.

[0026] The power supply 72 includes a transformer 130 which receivesalternating current on leads 132 and 134 from an external source ofalternating current. The transformer steps down the voltage to 24 voltsand feeds 24 volts to a pair of capacitors 138 and 140 which provide afiltering function. A 24 volt filtered DC potential is supplied on theline 76 to the relay logic 104. The potential is fed through a resistor142 across a pair of filter capacitors 144 and 146, which are connectedto a 5 volt voltage regulator 150, which supplies regulated 5 voltoutput voltage across a capacitor 152 and a Zener diode 154 to the line74.

[0027] Signals may be received by the controller at the antenna 32 andfed to the receiver 80. The receiver 80 includes a pair of inductors 170and 172 and a pair of capacitors 174 and 176 that provide impedancematching between the antenna 32 and other portions of the receiver. AnNPN transistor 178 is connected in common base configuration as a bufferamplifier. Bias to the buffer amplifier transistor 178 is provided byresistors 180. A resistor 188, a capacitor 190, a capacitor 192 and acapacitor 194 provide filtering to isolate a later receiver stage fromthe buffer amplifier 178. An inductor 196 also provides power supplybuffering. The buffered RF output signal is supplied on a line 200,coupled between the collector of the transistor 178 and a receivermodule 202 which is shown in FIG. 4. The lead 204 feeds into the unit202 and is coupled to a biasing resistor 220. The buffered radiofrequency signal is fed via a coupling capacitor 222 to a tuned circuit224 comprising a variable inductor 226 connected in parallel with acapacitor 228. Signals from the tuned circuit 220 are fed on a line 230to a coupling capacitor 232 which is connected to an NPN transistor 234at its based 236. The transistor has a collector 240 and emitter 242.The collector 240 is connected to a feedback capacitor 246 and afeedback resistor 248. The emitter is also coupled to the feedbackcapacitor 246 and to a capacitor 250. The line 210 is coupled to a chokeinductor 256 which provides ground potential to a pair of resistors 258and 260 as well as a capacitor 262. The resistor 258 is connected to thebase 236 of the transistor 234. The resistor 260 is connected via aninductor 264 to the emitter 242 of the transistor. The output signalfrom the transistor is fed outward on a line 212 to an electrolyticcapacitor 270.

[0028] As shown in FIG. 3, the capacitor 270 capacitively couples thedemodulated radio frequency signal to a bandpass amplifier 280 to anaverage detector 282 which feeds a comparator 284. The comparator 284also receives a signal directly from the bandpass amplifier 280 andprovides a demodulated digital output signal on the line 82 coupled tothe P32 pin of the Z86E21/61 microcontroller. The microcontroller isenergized by the power supply 72 and also controlled by the wall switch39 coupled to the microcontroller by the leads 100.

[0029] From time to time, the microcontroller will supply current to theswitch biasing module 96.

[0030] The microcontroller operates under the control of a main routineas shown in FIGS. 5A and 5B. When the unit is powered up, a power onreset is performed in a step 300, the memory is cleared and a check sumfrom read-only memory within the microcontroller 84 is tested. In a step302, if the check sum and the memory prove to be correct, control istransferred to a step 304, if not, control is transferred back to thestep 300. In the step 304, the last non-volatile state, which isindicative of the state of the operator, that is whether the operatorindicated the door was at its up limit, down limit or in the middle ofits travel, is tested for in a step 304 and if the last state is a downlimit, control is transferred to a step 306. If it was an up limit,control is transferred to a step 308. If it was neither a down nor an uplimit, control is transferred to a step 310. In the step 306, theposition is set as the down limit value and a window flag is set. Theoperation state is set as down limit. In a step 308, the position is setas up, the window flag is set and the operation state is set as uplimit. In the step 310, the position is set as outside the normal range,6 inches below the secondary up limit. The operation state is set asstopped. Control is transferred from any of steps 306, 308 and 310 to astep 312 where a stored simulated motor temperature is read from thenon-volatile memory 88. The temperature of a printed circuit boardpositioned within the head unit is read from the temperature sensor 120which is supplied over a line 120 a to the microcontroller. In order toread the PC board temperature, a pin P20 of the microprocessor is drivenhigh, causing a high potential to appear on a line 120 b which suppliesa current through the RTD sensor 120 to a comparator 120 c. A capacitor120 d connected to the comparator and to the temperature sensor, isgrounded and charges up. The other input terminal to the comparator hasa voltage divider 120 e connected to it to supply a reference voltage ofabout 2.5 volts. Thus, the microcontroller starts a timer running whenit brings line 120 b high and interrogates a line 120 f to determine itsstate. The line 120 f will be driven high when the temperature at thejunction of the RTD 120 and the capacitor 120 d exceeds 2.5 volts. Thus,the time that it takes to charge the capacitor through the resistance isindicative of the temperature within the head unit and, in this manner,the PC board temperature is read and if the temperature as read isgreater than the temperature retrieved from the non-volatile memory, thetemperature read from the PC board is then stored as the motortemperature.

[0031] In a step 314, constants related to the receipt and processing ofthe demodulated signal on the line 82 are initialized. In a step 316, atest is made to determine whether the learn switch 39 b had beenactivated within the last 30 seconds. If it has not, control istransferred back to the step 314.

[0032] In a step 318, a test is made to determine whether the commandswitch debounce timer has expired. If it has, control is transferred toa step 320. If it is not, control is transferred back to the step 314.In the step 320, the learn limit cycle is begun as will be discussed inmore detail as to FIGS. 6A through 6G. The main routine effectively hasa number of interrupt routines coupled to it. In the event that afalling edge is detected on the line 112 from the tachometer, aninterrupt routine related to the tachometer is serviced in the step 322.A timer interrupt occurs every 0.5 millisecond in a step 324 as shown inFIGS. 7A through 7B.

[0033] The obstacle detector 90 generates a pulse every 10 millisecondsduring the time when the beam from the infrared emitter 42 has not beeninterrupted either by the pass point system 49 or by an obstacle, in astep 326 following which the obstacle detector timer is cleared in astep 328.

[0034] As shown in FIGS. 10A through 10C, operation of the switchbiasing module 96 is controlled over the lines 100 by themicrocontroller 84. The microcontroller 84, in the step 340, tests todetermine whether an RS232 digital communications mode has been set. Ifit has, control is transferred to a step 342, as shown in FIG. 10C,testing whether data is stored in an output buffer to be output from themicrocontroller. If it is, control is transferred to a step 344outputting the next bit, which may include a start bit, from the outputbuffer and control is then transferred back to the main routine. In theevent that there is no data in the data buffer, control is transferredto the step 346, testing whether data is being received over lines 100.If it is being received, control is transferred to a step 348 to receivethe next bit into the input buffer and the routine is then exited. Ifnot, control is transferred to a step 350. In the step 350, a test ismade to determine whether a start bit for RS232 signalling has beenreceived. If it has not, control is transferred to a return step 352. Ifit has, control is transferred to a step 354 in which a flag is setindicating that the start bit has been received and the routine isexited. As shown in FIG. 10A, if the response to the decision block 340is no, control is transferred to a decision step 360. The switch statuscounter is incremented and then a test is determined as to whether thecontents of the counter are 29. If the switch counter is 29, control istransferred to a step 362 causing the counter to be zeroed. If thecounter is not 29, control is transferred to a step 364, testing forwhether the switch status is equal to zero. If the switch status isequal to zero, control is transferred to a step 366. In a step 366, acurrent source transistor 368, shown in FIG. 8, is switched on, drawingcurrent through resistors 370 and 372 and feeding current out through aline 39 a connected thereto to the switch module 39 a and, morespecifically, to a resistor 380, a 0.10 microfarad capacitor 382, a 1microfarad capacitor 384, a 10 microfarad capacitor 386 and a switchterminal 388. The switch 39 e is coupled to the switch terminal 388. Theswitch 39 d may be selectively coupled to the capacitor 386. The switch39 b may be selectively coupled to the capacitor 384. The switch 39 cmay be selectively coupled to the capacitor 382. A light emitting diode392 is connected to the resistor 380. Current flows through the resistor380 and the light emitting diode 392 back to another one of the lines 39a and through a field effect transistor 398 to ground. In step 402, thesense input on a line 100 coupled to the transistor 398 is tested todetermine whether the input is high. If the input is high immediately,that is indicative of the fact that switches 39 b through 39 e are allopen and in a step 404, debounce timers are decremented for all switchesand a got switch flag is set and the routine is exited in the event thatthe test of step 402 is negative. Control is then transferred to a step406 testing after 10 milliseconds if the sense in output on the line 100connected to the field effect transistor 398 is high, which would beindicative of the switch 39 c having been closed. If it is high, theworklight timer is incremented, all other switch timers are decremented,the got switch flag is set and the routine is exited. In the event thatthe decision in step 406 is in the negative, control is transferred to astep 410 and the routine is exited. In the event that the decision fromstep 364 is in the negative, control is transferred to a step 412wherein the switch status is tested as to whether it is equal to one. Ifit is, control is transferred to a step 414 testing whether the sensedinput on the line 100 connected to the field effect transistor is high.If it is, control is transferred to step 416 to set the got switch flag,after which in a step 418, the learn switch debouncer is incremented,all other switch counters are decremented, the got switch flag is setand the routine is exited. In the event that the answer to step 414 isin the negative, control is transferred to a return step 420.

[0035] In the event that the answer to step 412 is in the negative,control is transferred to a step 422, as shown in FIG. 10B. A test ismade as to whether the switch status is equal to 10. If it is, controlis transferred to a step 424 where the sense out input is tested ashigh.

[0036] Thus, the charging rate for the capacitors which, in effect, issensed on the line 100 connected to the field effect transistor 398which is coupled to ground, is indicative of which of the switches isclosed because the switch 39 c has a capacitor that charges at 10 timesthe rate of the capacitor 384 connected to 39 b and 100 times the rateof the capacitor 386 selectively couplable to switch 39 d.

[0037] After the switch measurement has been made, the transistor 368 isswitched non-conducting by the line 368 b and the field effecttransistor 398 is switched non-conducting by a line 450 connected to itsgate. A transistor 462, coupled via a resistor 464 to a line 466, isswitched on, biasing a transistor 468 on, causing current to flowthrough a diagnostic light emitting diode 470 to a field effecttransistor 472 which is switched on via a voltage on a line 474. Inaddition, the capacitors 386, 384 and 382, which may have been chargedare discharged through the field effect transistor 472.

[0038] In order to perform all of the switching functions after the step424 has been executed, control is transferred to a step 510 testingwhether the got switch flag has been cleared. If it has, control istransferred to a step 512 in which the command timer is incremented andall other timers are decremented and the got switch flag is set and theroutine is exited. If the got switch flag is cleared as indicated in thestep 510, the routine is exited in the step 514. In the event that thesense input is measured as being high in the step 424, control istransferred to a step 516 where the vacation or lock flag counter isincremented and all other counters are decremented. The got switch flagis set and the routine is exited. In the event that the switch statusequal 10 test in the step 422 is indicated to be no, control is thentransferred to a step 520 testing whether the switch status is 11. Ifthe switch status is 11, indicating that the routine has been sweptthrough 11 times, control is transferred to a step 522 in which thefield effect transistors 398 and 472 are both switched on, providingground pads on both sides of the capacitors causing the capacitors todischarge and the routine is then exited. In the event that the step 520test is negative, control is transferred to a step 524 testing whetherthe routine has been executed 15 times. If it has, control istransferred to a step 526 indicating that the bit which controls thestatus the light emitting diode 470, the diagnostic light emittingdiode, has been set. If it has not been set, control is transferred to astep 528 wherein both transistors 368 and 468 are switched on and boththe field effect transistors 398 and 472 are switched off. In order totest for short circuits between the source and drain electrodes of thefield effect transistors 398 and 472 which might cause false operationsignals to be supplied on the lines 100 to the microcontroller 84,resulting in inadvertent operation of the electric motor. The routine isthen exited. In the event that the test in step 526 indicates that thediagnostic LED bit has been set, control is transferred to a step 530.In the step 530, the transistors 468 and 472 are switched on allowingcurrent to flow through the diagnostic LED 470. In the event that thetest in step 524 is negative, a test is made in a step 532 as to whetherthe routine has been executed 26 times. If it has not, the routine isexited in a step 534. If it has, both of the field effect transistors398 and 372 are switched on to connect all of the capacitors to groundto discharge the capacitors and the routine is exited.

[0039] As shown in FIGS. 7A and 7B, when the timer interrupt occurs asin step 324, control is transferred to a step 550 shown in FIG. 7Awherein a test is made to determine whether a 2 millisecond timer hasexpired. If it has not, control is transferred to a step 552 determiningwhether a 500 millisecond timer has expired. If the 500 millisecondtimer has expired, control is transferred to a step 554 testing whetherpower has been switched on through the relay logic 104 to the electricmotor 106. If the motor has been switched on, control is transferred toa step 556 testing whether the motor is stalled, as indicated by themotor power having been switched on and by the fact that pulses are notcoming through on the line 112 from the tachometer 110. In the eventthat the motor has stalled, control is transferred to a step 558. In thestep 558 the existing motor temperature indication, as stored in one ofthe registers of the microcontroller 84, has added to it a constantwhich is related to a motor characteristic which is added in when themotor is indicated to be stalled. In the event that the response to thestep 556 is in the negative, indicating that the motor is not stalled,control is transferred to a step 560 wherein the motor temperature isupdated by adding a running motor constant to the motor temperature. Inthe event that the response to the test in step 554 is in the negative,indicating that motor power is not on and that heat is leaking out ofthe motor so that the temperature will be dropping, the new motortemperature is assigned as being equal to the old motor temperature,less the quantity of the old motor temperature, minus the ambienttemperature measured from the RTD probe 120, the whole differencemultiplied by a thermal decay fraction which is a number.

[0040] All of steps 558, 560 and 562 exit to a step 564 which test as towhether a 15 minute timer has timed out. If the timer has timed out,control is transferred to a step 566 causing the current, or updatedmotor temperature, to be stored in a non-volatile memory 88. If the 15minute timer has not been timed out, control is transferred to a step510, as shown in FIG. 7B. Step 566 also exits to step 568. A test ismade in the step 568 to determine whether a obstacle detector interrupthas come in via step 326 causing the obstacle detector timer to havebeen cleared. If it has not, the period will be greater than 12milliseconds, indicating that the obstacle detector beam has beenblocked. If the obstacle detector beam, in fact, has been blocked,control is transferred to a step 570 to set the obstacle detector flag.

[0041] In the event that the response to step 568 is in the negative,the obstacle detector flag is cleared in the step 572 and control istransferred to a step 574. All operational timers, including radiotimers and the like are incremented and the routine is exited.

[0042] In the event that the 2 millisecond timer tested for in the step550 has expired, control is transferred to a step 576 which calls amotor operation routine. Following execution of the motor operationroutine, control is transferred to the step 552. When the motoroperation routine is called, as shown in FIG. 8A, a test is made in astep 580 to determine the status of the motor operation state variablewhich may indicate that the up limit has been reached. If the up limitor the down limit have been reached, the motor is causing the door totravel up or down, the door has stopped in mid-travel or an auto-reversedelay indicating that the motor has stopped in mid-travel and will beswitching into up travel shortly. In the event that there is anauto-reverse delay, control is transferred to a step 582, when a test ismade for a command from one of the radio transmitters or from the wallcontrol unit and, if so, the state of the motor is set indicating thatthe motor has stopped in mid-travel. Control is then transferred to astep 584 in which 0.50 second timer is tested to determine whether ithas expired. If it has, the state is set to the up travel statefollowing which the routine is exited in the step 586. In the event thatthe operation state is in the up travel state, as tested for in step580, control is transferred to a step 588 testing for a command from aradio or wall control and if the command is received, the motoroperational state is changed to stop in mid-travel. Control istransferred to a step 590. If the force period indicated is longer thanthat stored in an up array location, indicated by the position of themotor. The state of the door is indicated as stopped in mid-travel.Control is then transferred to a step 592 testing whether the currentposition of the door is at the up limit, then the state of the door isset as being at the up limit and control is transferred to a step 594causing the routine to be exited, as shown in FIG. 8B.

[0043] In the event that the operational state tested for in the step580 is indicated to be at the up limit, control is transferred to a step596 which tests for a command from the radio or wall control unit and atest is made to determine whether the motor temperature is below a setpoint for the down travel motor temperature threshold. The state is setas being a down travel state. If the temperature value exceeds thethreshold or set point temperature value, an output diagnostic flag isset for providing an output indication in another routine. Control isthen transferred to a step 598, causing the routine to be exited. In theevent that the down travel limit has been reached, control istransferred to a step 600 testing for whether a command has come in fromthe radio or wall control and, if it has, the state is get asauto-reverse and the auto-reverse timer is cleared. Control is thentransferred to a step 602 testing whether the force period, asindicated, is longer than the force period stored in the down travelarray for the current position of the door. Auto-reverse is then enteredat step 582 on a later iteration of the routine. Control is transferredto a step 604 to test whether the position of the door is at the downlimit position and the pass point detector has already indicated thatthe door has swept the passed the pass point, the state is set as a downlimit state and control is transferred to a step 606 testing for whetherthe door. position is at the down limit position and testing for whetherthe pass point has been detected. If the pass point has not beendetected, the motor operational state is set to auto-reverse, causingauto-reverse to be entered in a later routine and control is transferredto a step 608, exiting the main routine.

[0044] In the event that the block 580 indicates that the door is at thedown limit, control is transferred to a step 610, testing for a commandfrom the radio or wall control and testing the current motortemperature. If the current motor temperature is below the up travelmotor temperature threshold, then the motor state variable is set asequal to up travel. If the temperature is above the threshold or setpoint temperature, a diagnostic code flag is then set for laterdiagnostic output and control is transferred to a return step 612. Inthe event that the motor operational state is indicated as being stoppedin mid-travel, control is transferred to a step 614 which tests for aradio or wall control command and tests the motor temperature value todetermine whether it is above or below a down travel motor temperaturethreshold. If the motor temperature is above the travel threshold, thenthe door is left stopped in mid-travel and the routine is returned fromin step 616.

[0045] In the event that the learn switch has been activated as testedfor in step 316 and the command switch is being held down as indicatedby the positive result from the step 318, the learn limit cycle isentered in step 320 and transfers control to a step 630, as shown inFIG. 6A, in step 630, the maximum force is set to a minimum value fromwhich it can later be incremented, if necessary. The motor up and motordown controllers in the relay logic 104 are disabled. The relay logic104 includes an NPN transistor 700 coupled to line 76 to receive 24 to28 volts therefrom via a coil 702 of a relay 704 having relay contacts706. A transistor 710 coupled to the microcontroller is also coupled toline 76 via a relay coil 714 and together comprise an up relay 718 whichis connected via a lead 720 to the electric motor 106. A down transistor730 is coupled via a coil 732 to the power supply 76. The down relay 732has an armature 734 associated with it and is connected to the motor todrive it down. Respective diodes 740 and 742 are connected across coils714 and 732 to provide protection when the transistors 710 and 730 areswitched off. In the step 632, both the transistors 710 and 730 areswitched off, interrupting either up motor power or down motor power tothe electric motor 106 and the microcontroller delays for 0.50 second.Control is then transferred to a step 634, causing the relay 704 to beswitched on, delivering power to an electric light or worklight 750associated with the head unit. The up motor relay 716 is switched on. A1 second timer is also started which inhibits testing of force limitsdue to the inertia of the door as it begins moving. Control is thentransferred to a step 636, testing for whether the 1 second timer hastimed out and testing for whether the force period is longer than theforce limit setting. If both conditions have occurred, control istransferred to a step 640 as shown in FIG. 6B. If either the 1 secondtimer has not timed out or the force period is not longer than the forcelimit setting, control is transferred to a step 638 which tests whetherthe command switch is still being held down. If it is, control istransferred back to step 636. If it is not, control is transferred tothe step 640. In step 640, both the up transistor 710 and the downtransistor 730 are causing both the up motor and down motor command fromthe relay logic to be interrupted and a delay of 0.50 second is takenand the position counter is cleared. Control is then transferred to astep 640 in which the transistor 730 is commanded to switch on, startingthe motor moving down and the 1 second force ignore timer is startedrunning. A test is made in a step 642 to determine whether the commandswitch has been activated again. If it has, the force limit setting isincreased in a step 644 following which control is then transferred backto the step 632. If the command switch is not being held down, controlis then transferred to a step 646, testing whether the 1 second forceignore timer has timed out. The last 32 rpm pulses indicative of theforce are ignored and a force period from the previous pulse is acceptedas the down force. Control is then transferred to a step 648 and a testis made to determine whether the movable barrier is at the pass point asindicated by the pass point detector 49 interacting with the opticaldetector 46. Control is then transferred to a step 650. The positioncounter is complemented and the complemented value is stored as the uplimit following which the position counter is cleared and a pass pointflag is set. Control is then transferred back to the step 642. In theevent that the result of the test in step 648 is negative, control istransferred to a step 652 which tests whether the 1 second force delaytimer has expired and whether the force period is greater than the forcelimit setting, indicating that the force has exceeded. If both of thoseconditions have occurred, control is transferred to a step 654 whichtests whether the pass point flag has been set. If it has not been set,control is transferred to a step 656, wherein the position counter iscomplemented and the complemented value is saved as the up limit and theposition counter is cleared. In the event that the pass point flag hasbeen set, control is transferred to a step 658. In the event that thetest in step 652 has been negative, control is transferred to a step 660which tests the value of the obstacle reverse flag. If the obstaclereverse flag has not been set, control is transferred to the step 642shown on FIG. 6B. If the flag has been set, control is transferred tothe step 654.

[0046] In a step 658, both transistors 710 and 730 are switched offinterrupting up and down power from the relays to the electric motor 106and halting the motor and the microcontroller then delays for 0.50second. Control is then transferred to a step 660. In step 660, thetransistor 710 is switched on switching on the up relay causing themotor to be turned to drive the door upward and the 1 second forceignore timer is started. Control is transferred to a decision step 662testing for whether the command switch is set. If the command switch isset, control is transferred back to the step 664 causing the force limitsetting to be increased, following which control is transferred to thestep 632, interrupting the motor outputs. If the command switch has notbeen set, control is transferred to the step 664 causing the maximumforce from the 33rd previous reading to be saved as the up force,following which control is transferred to a decision block 666 whichtests for whether the 1 second force ignore timer has expired andwhether the force period is longer than the force limit setting. If bothconditions are true, control is transferred to a step 668. If not,control is transferred to a step 670 which tests for whether the doorposition is at the up limit. If the door position is at the up limit,control is transferred to the step 668, switching off both of the motoroutputs to halt the door and delaying for 0.50 second. If the positiontested in step 670 is not at the upper limit, control is transferredback to the step 662. Following step 668, control is transferred to thestep 676 during which the command switch is tested. If the commandswitch is set, control is transferred back to the step 644 causing theforce limit setting to be increased and ultimately to the step 632 whichswitches off the motor outputs and delays for 0.50 second. If thecommand switch has not been set, control is transferred to a step 678.If the position counter indicates that the door is presently at a pointwhere a force transition normally occurs or where force settings are tochange, and the 1 second force ignore timer has expired, the 33rdprevious maximum force is stored and the down force array is filled withthe last 33 force measurements. Control is then transferred to a step680 which tests for whether the obstacle detector reverse flag has beenset. If it has not been set, control is transferred to a step 682 whichtests for whether the 1 second force ignore timer has expired andwhether the force period is longer than the force limit setting. If boththose conditions are true, control is transferred to a step 684 whichtests for the pass point being set. If the pass point flag was not set,control is transferred to the step 688. In the event that the obstaclereverse flag is set, control is also transferred to the step 688. In theevent that the decision block 682 is answered in the negative, controlis transferred back to the step 676. If the pass point flag has been setas tested for in the step 684, control is transferred to the step 686wherein the current door position is saved as the down limit position.In step 688, both the motor output transistors 710 and 730 are switchedoff, interrupting up and down power to the motor and a delay occurs for0.50 second. Control is then transferred to the step 690 wherein the uptransistor 710 is switched on, causing the up relay to be actuated,providing up power to the motor and the 1 second force ignore timerbegins running. In the step 692, a test is made for whether the commandhas been set again. If it has, control is transferred back to the step644, as shown in FIG. 6B, and following that to the step 632, as shownin FIG. 6A. If the command switch has not been set, control istransferred to the step 694 which tests for whether the position counterindicates that the door is at a sectional force transition point orbarrier and the 1 second force ignore timer has expired. If both thoseconditions are true, the maximum force from the last sectional barrieris then loaded. Control is then transferred to a decision step 696testing for whether the 1 second force ignore timer has timed out andwhether the force period is indicated to be longer than the force periodlimit setting. If both of those conditions are true, control is thentransferred to a step 698 causing the motor output transistors 710 and730 to be switched off and all data is stored in the non-volatile memory88 and the routine is exited. In the event that decision is indicated tobe in the negative from the decision step 696, control is transferred toa step 697 which tests whether the door position is presently at the uplimit position. If it is, control is then transferred to the step 698.If it is not, control is transferred to the step 692.

[0047] In the event that the rpm interrupt step 322, as shown in FIG.5B, is executed, control is then transferred to a step 800, as shown inFIG. 9A. In step 800, the time duration from the last rpm pulse from thetachometer 110 is measured and saved as a force period indication.Control is then transferred to a decision block. Control is transferredto the step 802, in which the operator state variable is tested. In theevent that the operator state variable indicates that the operator iscausing the door to travel down, the door is at the down limit or thedoor is in the auto-reverse mode, control is transferred to a step 804causing the door position counter to be incremented. In the event thatthe door operator state indicates that the door is travelling upward,has reached its up limit or has stopped in mid-travel, control istransferred to a step 806 which causes the position counter to bedecremented. Control is then transferred to a decision step 808 in whichthe pass point pattern testing flag is tested for whether it is set. Ifit is set, control is transferred to a step 810 which tests a timer todetermine whether the maximum pattern time allotted by the system hasexpired. In the event that the pass point pattern testing flag is notset, control is transferred to a step 812, testing for whether theoptical obstacle detector flag has been set. If is not, the routine isexited in a step 814. If the obstacle detector flag has been set,control is transferred to a step 816 wherein the pattern testing flag isset and the routine is exited. In the event that the maximum patterntime has timed out. As tested for in the step 810, control istransferred to a step 820 wherein the optical reverse flag is set andthe routine is exited. In the maximum pattern time has not expired, atest is made in a step 822 for whether the microcontroller has sensedfrom the obstacle detector that the beam has been blocked open within acorrect timing sequence indicative of the pass point detection system.If it has not, the routine is exited in a step 824. If it has, controlis transferred to a step 826. Testing for whether a window flag has beenset. As to whether the rough position of the door would indicate thatthe pass point should have been encountered. If the window flag has beenset, control is transferred to a step 828, testing for whether theposition is within the window flag position. If it has, control istransferred to a step 832, causing the position counter to be cleared orrenormalized or zeroed, setting the window flag and set a flagindicating that the pass point has been found, following which theroutine is exited. In the event that the position is now within thewindow as tested for in step 828, the obstacle reverse flag is set in astep 830 and the routine is exited. In the event that the test made instep 326 indicates that the window flag has not been set, control isthen transferred directly to the step 832.

[0048] While there has been illustrated and described a particularembodiment of the present invention, it will be appreciated thatnumerous changes and modifications will occur to those skilled in theart, and it is intended in the appended claims to cover all thosechanges and modifications which fall within the true spirit and scope ofthe present invention.

What is claimed is:
 1. A movable barrier operator comprising: anelectric motor; a switch operatively coupled to the electric motor forcommanding the electric motor to move; a switch for commanding a learnmode; a transmission connected to the electric motor to be driventhereby and for connection to a movable barrier to be moved; means forstoring a force set point; and means responsive to the learn mode fordetecting the force applied to the movable barrier and for changing theforce set point when the force needed to move the barrier to an open orclosed position is greater than the force set point.
 2. A movablebarrier operator comprising: an electric motor; a switch operativelycoupled to the electric motor for commanding the electric motor to move;a transmission connected to the electric motor to be driven thereby andfor connection to a movable barrier to be moved; means for detectingwhen the movable barrier has moved to a stored digital end of travelposition and for halting the barrier in response to the stored digitalend of travel position having been exceeded; and a barrier positionsignal generator for producing a barrier position signal for normalizingthe detector means; means for changing the stored digital end of travelposition when, after halting, the motor is commanded to move by theswitch.
 3. A movable barrier operator comprising: an electric motor; aswitch operatively coupled to the electric motor for commanding theelectric motor to move; a transmission connected to the electric motorto be driven thereby and for connection to a movable barrier to bemoved; an ambient temperature detector positioned near the electricmotor; means for storing a difference between the integral of the motorspeed with respect to time when the motor is energized less the time themotor is not energized as adjusted for by the ambient temperature; andmeans for anticipating the contribution to the time integral during thenext commanded operation of the motor and inhibiting the motor if thepredicted result exceeds a set point.
 4. A movable barrier operatorcomprising: an electric motor; a transmission connected to the electricmotor to be driven thereby and for connection to a movable barrier to bemoved; a multiplexing switch having a plurality of switches andproviding a different signal for each switch of said plurality that hasbeen closed; and a controller having a port connected to themultiplexing switch and to the electric motor to control the operationof the electric motor in response to closure of one of the switches ofthe plurality of switches.
 5. A movable barrier operator according toclaim 4 wherein the controller is adapted to receive a serial digitalcommunication through the port connected to the multiplexing switch.